package com.s4j.struts.biz.model;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * 合并疾病，对应BizMgAppr
 * @author Administrator
 *
 */
@Entity
@Table(name="BIZ_COMBINEDDISEASE")
public class CombinedDisease {

	private Long cdId;
	
	private String cdname;  //疾病名
	
	private BizMgAppr mgAppr;

	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	public Long getCdId() {
		return cdId;
	}

	public void setCdId(Long cdId) {
		this.cdId = cdId;
	}

	@Column(length=100, nullable=false)
	public String getCdname() {
		return cdname;
	}

	public void setCdname(String cdname) {
		this.cdname = cdname;
	}
	
	@ManyToOne(cascade=CascadeType.ALL, fetch=FetchType.LAZY)
	@JoinColumn(name="mgApprId")
	public BizMgAppr getMgAppr() {
		return mgAppr;
	}

	public void setMgAppr(BizMgAppr mgAppr) {
		this.mgAppr = mgAppr;
	}
}
